package com.example.administrator.ygddriver.order.getorder;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.administrator.ygddriver.R;

import java.util.List;

public class GetOrderAdapter extends BaseQuickAdapter<PickUpRequestBean.ResultBean, BaseViewHolder> {
    private String place;

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public GetOrderAdapter(int layoutResId, @Nullable List<PickUpRequestBean.ResultBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, PickUpRequestBean.ResultBean item) {
        helper.setText(R.id.item_fragment_get_order_waybill_number_tv, item.getC_waybillnumber() + "个运单");
        helper.setText(R.id.item_fragment_get_order_parcel_number_tv, "共" + item.getC_parcelnumber() + "件");
        helper.setText(R.id.item_fragment_get_order_network_name_tv, item.getC_networkname());
        helper.setText(R.id.item_fragment_get_order_network_location_tv, item.getC_networklocation());
        helper.setText(R.id.item_fragment_get_order_distance_tv, String.valueOf(item.getC_distance() + "公里"));
        helper.setText(R.id.item_fragment_get_order_now_location_tv, place);
        helper.addOnClickListener(R.id.item_fragment_get_order_ll4);
        helper.addOnClickListener(R.id.item_fragment_get_order_ll);
    }
}
